# Python set集合详解
## python 创建set集合
### 使用 {} 创建
a = {1, 'c', 1, (1, 2, 3), 'c'}
print("a =", a)

### 使用 set() 函数创建集合
set1 = set("c.biancheng.net")
set2 = set([1, 2, 3, 4, 5])
set3 = set((1, 2, 3, 4, 5))
print("set1 =", set1)
print("set2 =", set2)
print("set3 =", set3)

print()

## python 访问set集合元素
a = {1, 'c', 1, (1, 2, 3), 'c'}
for ele in a:
    print(ele, end = ' ')
print()

## python 删除set集合
a = {1, 'c', 1, (1, 2, 3), 'c'}
print("a =", a)
del(a)
print("a =", a)



